#include <stdio.h> 
#include <string.h>


int main(void){
    FILE *fpr = popen("df -l | grep /run/user/10001", "r");
    FILE *fpw = popen("grep /run/user/1000", "w");
    char buf[256];
    int ret;
    
    while((ret = fread(buf, 1, sizeof(buf), fpr)) > 0){
//         fwrite(buf, 1, ret, fpw);
        int n = strlen(buf);
        printf("test.... %d %s\r\n", n, buf);
    }
    
    pclose(fpr);
    pclose(fpw);
    
    return 0;
}
